package m3d31;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;

//字节缓冲输入流  继承InputStream
public class iBufferedInputStream {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("day02\\src\\m3d31\\b.txt");

        BufferedInputStream bis = new BufferedInputStream(fis);

        int len = 0;
        byte[] bytes = new byte[1024];
        while((len = bis.read(bytes))!=-1){
            System.out.println(new String(bytes,0,len));
        }

        bis.close();
    }
}
